Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support synchronous running of modules and locking for concurrency #109

Conversation

daradermody
Copy link

  • Supports the sync query parameter for the POST /api/task/ endpoint so results can be returned as part of the request.
  • Add data to task info (should the result_ttl for tasks be configurable in the global options? It defaults to 500 seconds)
  • Supports the options payload attribute so a module can be run with a single request
  • Uses locks to prevent a module being executed multiple times with different options (causing race conditions)

The second point resolves #107. The last two points add support for stateful usage of the POST /api/tasks/ endpoint.

Request

POST http://localhost:5000/api/tasks/?sync
{
  "path": "recon/domains-hosts/hackertarget",
  "options": {
      "SOURCE": "google.com"
  }
}

Response

{
    "summary": {
        "hosts": {
            "count": 501,
            "new": 0
        }
    },
    "data": {
        "hosts": [
            {
                "host": "google.com",
                "ip_address": "172.217.15.110",
                "region": null,
                "country": null,
                "latitude": null,
                "longitude": null,
                "notes": null,
                "module": "hackertarget"
            },
            ...
        ]
    }
}

@daradermody daradermody marked this pull request as ready for review June 26, 2020 11:42
@daradermody
Copy link
Author

@lanmaster53, can you have a look at this PR? Any feedback would be greatly appreciated.

@daradermody daradermody changed the base branch from master to staging July 8, 2020 16:11
@daradermody
Copy link
Author

Closing as repo doesn't seem to be maintained anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrieve data by task id on web-server side
1 participant